package com.dongdongshop.imp;

import com.dongdongshop.mapper.TbUserMapper;
import com.dongdongshop.pojo.TbUser;
import com.dongdongshop.service.TbUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.swing.text.TabableView;

@Service
@com.alibaba.dubbo.config.annotation.Service
public class TbUserServiceImp implements TbUserService {
    @Autowired
    private TbUserMapper tbUserMapper;

    @Override
    public TbUser showAppUser(String uname) {
        return tbUserMapper.selectTbUser(uname);
    }

    @Override
    public int showAppUname(String username) {
        TbUser tbUser = tbUserMapper.showAppUname(username);
        if (tbUser != null){
            return 1;
        }else {
            return 0;
        }
    }

    @Override
    public int showRegister(TbUser tbUser) {
        return tbUserMapper.insertSelective(tbUser);
    }
}
